import math
def angle(z):
    """
    Computes the polar angle of a complex number.

    Args:
        z (complex): The complex number to compute the polar angle of.

    Returns:
        float: The polar angle of the complex number in radians.
    """
    if isinstance(z, (list, tuple)):
        return [angle(x) for x in z]
    elif isinstance(z, complex):
        if z.real > 0:
            return math.atan(z.imag / z.real)
        elif z.real < 0 and z.imag >= 0:
            return math.atan(z.imag / z.real) + math.pi
        elif z.real < 0 and z.imag < 0:
            return math.atan(z.imag / z.real) - math.pi
        elif z.real == 0 and z.imag > 0:
            return math.pi / 2
        elif z.real == 0 and z.imag < 0:
            return -math.pi / 2
    elif isinstance(z, (int,float)):
        return 0.0
    else:
       raise TypeError("Input type not supported.") 


z1 = 1 + 1j
result1 = angle(z1)
expected_result1 = 0.7853981633974483  # This is the angle in radians

assert result1 == expected_result1, f"Test case 1 failed: expected {expected_result1}, but got {result1}"

z2 = -1 + 1j
result2 = angle(z2)
expected_result2 = 2.356194490192345  # This is the angle in radians

assert result2 == expected_result2, f"Test case 2 failed: expected {expected_result2}, but got {result2}"

z3 = -1 - 1j
result3 = angle(z3)
expected_result3 = -2.356194490192345  # This is the angle in radians

assert result3 == expected_result3, f"Test case 3 failed: expected {expected_result3}, but got {result3}"

z4 = 1 - 1j
result4 = angle(z4)
expected_result4 = -0.7853981633974483  # This is the angle in radians

assert result4 == expected_result4, f"Test case 4 failed: expected {expected_result4}, but got {result4}"

z5 = 2 + 0j
result5 = angle(z5)
expected_result5 = 0.0  # This is the angle in radians

assert result5 == expected_result5, f"Test case 5 failed: expected {expected_result5}, but got {result5}"

